import { Component, OnInit } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { ResultList } from '../result-list';
import { RequestMapping } from '../request.mapping';
import { PageParam } from '../page';

@Component({
  selector: 'app-house-manager',
  templateUrl: './house-manager.component.html',
  styleUrls: ['./house-manager.component.css']
})
export class HouseManagerComponent implements OnInit {

  _allChecked = false;
  _indeterminate = false;

  
  resultList:ResultList = new ResultList();

  pageParam:PageParam = new PageParam();
  constructor(public http:HttpClient) { }

  ngOnInit() {
    this.refreshData();
  }


  refreshData(){
    this.http.get<ResultList>(RequestMapping.GET_HOUSES+"?pageNoParam="+this.pageParam.pageNo+"&pageSizeParam="+this.pageParam.pageSize).toPromise()
    .then(response => {
      this.resultList = response;

    })
  }




 


}
